package de.draufi.tools;

public class stringtools {

	public static final byte LINKS = 1;
	public static final byte RECHTS = 2;

	public static final String SPACE = " ";
	
	
	
	public static String upsize(String text, int size, String filler, byte Richtung) {
		String _s = text.trim();
		StringBuilder _f = new StringBuilder();
		String result = "";
		for (int i=_s.length();i<size;i++) {
			_f.append(filler);
		}
		if (Richtung == LINKS) {
			result =  _s + _f.toString();
		} else {
			result = _f.toString() + _s;
		}
		return result;
	}
}
